package com.st.rzs.util;

import java.util.HashMap;
import java.util.Map;

public class HttpRequestUtilTest {
	public static void main(String[] args) {

		// String url =
		// "http://192.168.2.221:8080/service/deviceManager/getDeviceList.do?UserID=2&UserName=admin";
		Map<String, Object> uriVariables = new HashMap<String, Object>();
		// uriVariables.put("MachineTypeID", -1);
		// uriVariables.put("MachineInstallType", -1);
		// uriVariables.put("MachineStatus", -1);
		// uriVariables.put("UnitTypeCode", -1);
		// uriVariables.put("VMark", 1);
		// uriVariables.put("page", 1);
		// uriVariables.put("rows", 20);

		String url = "http://localhost:8080/read?path=kv/myapp";
		ResponseModel responseModel = HttpClientUtils.doGet(url, uriVariables, Map.class);
		System.out.println(responseModel.getData());

		ResponseModel responseModel2 = HttpClientUtils.doPost(url, uriVariables, Map.class);
		System.out.println("string: " + responseModel2.getData());

	}
}
